<?php
require_once("./config.php");
require_once("./classes/sessao.php");
require_once("./classes/conexao.php");
require_once("./classes/barranavegacao.php");
require_once("./classes/traducao.class.php");
/*if (!isset($_SESSION['ANAWEB']) || $_SESSION['ANAWEB']->RetornaIdioma() == "PT_BR")
    require_once("./linguas/pt_br.php");
else
    require_once("./linguas/en_us.php");*/

class Interfaces {
    private $msg;

    public function __construct()
    {
        //inicializando variaveis utilizadas
        global $DOCUMENT_ROOT;

        if (!isset($_SESSION['ANAWEB']) || $_SESSION['ANAWEB']->RetornaIdioma() == "PT_BR")
        {
            $this->msg = new Traducao($DOCUMENT_ROOT."/linguas/linguas.xml", "pt-br");
        }
        else
        {
            $this->msg = new Traducao($DOCUMENT_ROOT."/linguas/linguas.xml", "en-us");
        }
        
    }
    public function Header($titulo = "ANAWEB", $script = "")
    {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="pt-br">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title><?php echo $titulo ?></title>
        <style type="text/css">
            @import url("./css/geral.css");
            @import url("./css/legado.css");
        </style>
<?php
        if (is_array($script))
        {
            foreach ( $script as $js )
            {
?>
        <script type="text/javascript" src="./javascript/<?php echo $js; ?>"></script>
<?php
            }
        }
?>
    </head>
<?php
    }

    public function Body()
    {
?>
    <body<?php
    if (isset($_GET['opcao']) || isset($_GET['inc']))
    {
        if (isset($_GET['opcao']))
        {
            $opcao = $_GET['opcao'];
        }
        else
        {
            $opcao = explode(".",$_GET['inc']);
            $opcao = $opcao[0];
        }
        switch ($opcao)
        {
                case "gera_prob_ptoflut_sistema_xml":
                    echo " onload=\"showhide('pf','titulo_pf')\"";
                    break;
                case "gera_prob_ptoflut_soma_xml":
                    echo " onload=\"showhide('pf','titulo_pf')\"";
                    break;
                case "gera_prob_ptoflut_multiplicacao_xml":
                    echo " onload=\"showhide('pf','titulo_pf')\"";
                    break;
                case "gera_prob_ptoflut_divisao_xml":
                    echo " onload=\"showhide('pf','titulo_pf')\"";
                    break;
                case "gera_prob_ptoflut_subtracao_xml":
                    echo " onload=\"showhide('pf','titulo_pf')\"";
                    break;
                case "gera_prob_matriz_determinante_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_inversa_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_decmat_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_matdefpos_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_mul_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_soma_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "gera_prob_matriz_transposta_xml":
                    echo " onload=\"showhide('matriz','titulo_matriz')\"";
                    break;
                case "seal_direto":
                    echo " onload=\"showhide('seal','titulo_seal')\"";
                    break;
                case "seal_iterativo":
                    echo " onload=\"showhide('seal','titulo_seal'); \"";
                    break;
                case "gera_interpolacao":
                    echo " onload=\"showhide('interpolacao','titulo_interpolacao');\"";
                    break;
                case "gera_prob_ajdados1_xml":
                    echo " onload=\"showhide('ajdados','titulo_ajdados');\"";
                    break;
                case "gera_prob_eqnl3_xml":
                    echo " onload=\"showhide('reseqnl','titulo_reseqnl');\"";
                    break;
                case "gera_prob_seqnl_xml":
                    echo " onload=\"showhide('seqnl','titulo_seqnl')\"";
                    break;
                case "gera_prob_derivada_xml":
                    echo " onload=\"showhide('intder','titulo_intder'); showhide('derivada','titulo_derivada');\"";
                    break;
                case "gera_prob_intnum1_xml":
                    echo " onload=\"showhide('intder','titulo_intder'); showhide('integral','titulo_integral');\"";
                    break;
                case "gera_prob_intnum2_xml":
                    echo " onload=\"showhide('intder','titulo_intder'); showhide('integral','titulo_integral');\"";
                    break;
                case "gera_prob_intnum3_xml":
                    echo " onload=\"showhide('intder','titulo_intder'); showhide('integral','titulo_integral');\"";
                    break;
                case "gera_prob_intnum4_xml":
                    echo " onload=\"showhide('intder','titulo_intder'); showhide('integral','titulo_integral');\"";
                    break;
                case "sistemaPF":
                    echo " onload=\"trees[0].toggle(1);\"";
                    break;
                case "somaPF":
                    echo " onload=\"trees[0].toggle(1);\"";
                    break;
                case "multiplicacaoPF":
                    echo " onload=\"trees[0].toggle(1);\"";
                    break;
                case "divisaoPF":
                    echo " onload=\"trees[0].toggle(1);\"";
                    break;
                case "subtracaoPF":
                    echo " onload=\"trees[0].toggle(1);\"";
                    break;
                case "determinante":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "inversa":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "decmat":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "matdefpos":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "multiplicacao":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "soma":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "transposta":
                    echo " onload=\"trees[0].toggle(7);\"";
                    break;
                case "gauss1":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(16); trees[0].toggle(17);\"";
                    break;
                case "gauss2":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(16); trees[0].toggle(17);\"";
                    break;
                case "gauss3":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(16); trees[0].toggle(17);\"";
                    break;
                case "ludecomp":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(16);\"";
                    break;
                case "cholesky":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(26);\"";
                    break;
                case "gauss-seidel":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(22);\"";
                    break;
                case "jacobi":
                    echo " onload=\"trees[0].toggle(15); trees[0].toggle(22);\"";
                    break;
                case "lagrange":
                    echo " onload=\"trees[0].toggle(25);\"";
                    break;
                case "newton":
                    echo " onload=\"trees[0].toggle(25);\"";
                    break;
                case "spline":
                    echo " onload=\"trees[0].toggle(25);\"";
                    break;
                case "ajdados1":
                    echo " onload=\"trees[0].toggle(29);\"";
                    break;
                case "ajdados2":
                    echo " onload=\"trees[0].toggle(29);\"";
                    break;
                case "eqnl2":
                    echo " onload=\"trees[0].toggle(32);\"";
                    break;
                case "eqnl1":
                    echo " onload=\"trees[0].toggle(32);\"";
                    break;
                case "eqnl3":
                    echo " onload=\"trees[0].toggle(32);\"";
                    break;
                case "eqnl_graf":
                    echo " onload=\"trees[0].toggle(32);\"";
                    break;
                case "seqnl":
                    echo " onload=\"trees[0].toggle(36);\"";
                    break;
                case "derivada":
                    echo " onload=\"trees[0].toggle(38); trees[0].toggle(39);\"";
                    break;
                case "intnum1":
                    echo " onload=\"trees[0].toggle(38); trees[0].toggle(41);\"";
                    break;
                case "intnum2":
                    echo " onload=\"trees[0].toggle(38); trees[0].toggle(41);\"";
                    break;
                case "intnum3":
                    echo " onload=\"trees[0].toggle(38); trees[0].toggle(41);\"";
                    break;
                case "intnum4":
                    echo " onload=\"trees[0].toggle(38); trees[0].toggle(41);\"";
                    break;
        }
    }
?>>
    <div id="geral">
        <div id="topo">
            <h1 class="bannertopo"><?php echo $this->msg->get("Logo") ?></h1>
<?php
            if (isset($_SESSION['ANAWEB']))
            {
?>
            <form name="formtrocamodo" method="post" action="trocamodo.php">
                <p class="textotopo">
                <strong><?php echo $this->msg->get("Usuario") ?>:</strong>  <?php echo $_SESSION['ANAWEB']->RetornaEmail()?> -
                <select name="modo" class="selecttopo" onchange="document.formtrocamodo.submit()">
                    <option value="-">-</option>
                    <option value="aluno"<?php if ($_SESSION['ANAWEB']->RetornaModo() == "aluno") echo " selected"?>><?php echo $this->msg->get("Modo_Aprendiz"); ?></option>
<?php
        if ($_SESSION['ANAWEB']->RetornaTipoUsuario() != "aluno")
        {
?>
                    <option value="professor"<?php if ($_SESSION['ANAWEB']->RetornaModo() == "professor") echo " selected"?>><?php echo $this->msg->get("Modo_Autoria"); ?></option>
<?php
        }
?>
                </select>
                -
                <select name="ambiente" class="selecttopo" onchange="document.formtrocamodo.submit()">
                    <option value="-">-</option>
                    <option value="numerico"<?php if ($_SESSION['ANAWEB']->RetornaAmbiente() == "numerico") echo " selected"?>><?php echo $this->msg->get("Ambiente_Numerico") ?></option>
                    <option value="scilab"<?php if ($_SESSION['ANAWEB']->RetornaAmbiente() == "scilab") echo " selected"?>><?php echo $this->msg->get("Ambiente_Scilab") ?></option>
                    <option value="maple"<?php if ($_SESSION['ANAWEB']->RetornaAmbiente() == "maple") echo " selected"?>><?php echo $this->msg->get("Ambiente_Maple") ?></option>
                </select>
<?php
        if ($_SESSION['ANAWEB']->RetornaModo() == "professor" && $_SESSION['ANAWEB']->RetornaAmbiente() == "numerico")
        {
?>
                - <?php echo $this->msg->get("Biblioteca") ?>: 
                <select name="biblioteca" class="selecttopo" onchange="document.formtrocamodo.submit()">
                    <option value="0">-</option>
<?php
            $conexao = new Conexao();
            $conexao->Conecta();
            if ($_SESSION['ANAWEB']->RetornaTipoUsuario() == "professor")
            {
                $query = $conexao->Executa("SELECT * FROM biblioteca WHERE id_professor=".$_SESSION['ANAWEB']->RetornaId());
                while ($bib = $query->FetchRow())
                {
?>
                    <option value="<?php echo $bib['id_biblioteca'] ?>"<?php if ($_SESSION['ANAWEB']->RetornaBiblioteca() && $bib['id_biblioteca'] == $_SESSION['ANAWEB']->RetornaBiblioteca()) echo " selected" ?>><?php echo $bib['NomeBiblioteca'] ?></option>
<?php
                }
            }
            $query = $conexao->Executa("SELECT * FROM colaborador_biblioteca WHERE id_user=".$_SESSION['ANAWEB']->RetornaId());
            while ($bib = $query->FetchRow())
            {
                $query2 = $conexao->Executa("SELECT * FROM biblioteca WHERE id_biblioteca=".$bib['id_bib']);
                if ($bib2 = $query2->FetchRow())
?>
                    <option value="<?php echo $bib2['id_biblioteca'] ?>"<?php if ($_SESSION['ANAWEB']->RetornaBiblioteca() && $bib2['id_biblioteca'] == $_SESSION['ANAWEB']->RetornaBiblioteca()) echo " selected" ?>><?php echo $bib2['NomeBiblioteca'] ?></option>
<?php
            }
?>
                </select>
<?php
        }
?>
                (<a href="logout.php"><?php echo $this->msg->get("Sair")?></a>)
                </p>
            </form>
<?php
?>
<?php
            }
?>
        </div>
        <div id="caminho">
<?php
        $barranavegacao = new BarraNavegacao();
        $barranavegacao->Mostrar();
?>
        </div>
        <div id="menu">
            <div class="menutit"><?php echo $this->msg->get("Minha_Conta"); ?></div>
<?php
        if (!isset($_SESSION['ANAWEB']))
        {
?>
            <div class="menuitem">
            <a href="./"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Inicio"); ?>"> <?php echo $this->msg->get("Inicio"); ?></a><br>
            <a href="./cadastro.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Cadastrar"); ?>"> <?php echo $this->msg->get("Cadastrar"); ?></a><br>
            <hr>
            <form name="login" action="login.php" method="POST">
                <label for="email"><?php echo $this->msg->get("Email"); ?></label><br>
                <input type="text" name="email" id="email"><br>
                <label for="senha"><?php echo $this->msg->get("Senha"); ?></label><br>
                <input type="password" name="senha" id="senha"><br>
                <input type="submit" name="logar" value="<?php echo $this->msg->get("Logar"); ?>">
            </form>
            </div>
<?php
        }
        else
        {
?>
            <div class="menuitem">
            <a href="./"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Inicio"); ?>"> <?php echo $this->msg->get("Inicio"); ?></a><br>
            <a href="update.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Alterar_Cadastro"); ?>"> <?php echo $this->msg->get("Alterar_Cadastro"); ?></a><br>
<?php
            if ($_SESSION['ANAWEB']->RetornaTipoUsuario() == "professor" && $_SESSION['ANAWEB']->RetornaModo() == "professor")
            {
?>
            <a href="gerenciarbiblioteca.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Gerenciar_Bibliotecas"); ?>"> <?php echo $this->msg->get("Gerenciar_Bibliotecas"); ?></a><br>
            <a href="upload.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Enviar_Material_Teorico"); ?>"> <?php echo $this->msg->get("Enviar_Material_Teorico"); ?></a><br>
<?php
            } elseif ($_SESSION['ANAWEB']->RetornaTipoUsuario() == "colaborador") {
?>
            <a href="colaborarbiblioteca.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get("Colaborar_Biblioteca") ?>"> <?php echo $this->msg->get("Colaborar_Biblioteca") ?></a><br>
<?php
            }
?>
            <a href="logout.php"><img src="./imagens/foldericon.png" alt="<?php echo $this->msg->get( Sair ); ?>"> <?php echo $this->msg->get("Sair"); ?></a><br>
            </div>
<?php
            if (($_SESSION['ANAWEB']->RetornaAmbiente() == "scilab" || $_SESSION['ANAWEB']->RetornaAmbiente() == "maple") && ($_SESSION['ANAWEB']->RetornaModo() == "aluno"))
            {
?>
            <div class="menutit"><?php echo $this->msg->get("Computacao_Algebrica") ?></div>
            <script type="text/javascript" src="menu.php"></script>
<?php
            }
            if (($_SESSION['ANAWEB']->RetornaAmbiente() == "numerico") && ($_SESSION['ANAWEB']->RetornaModo() == "aluno" || ($_SESSION['ANAWEB']->RetornaModo() == "professor" && $_SESSION['ANAWEB']->RetornaBiblioteca())))
            {
?>
            <div class="menutit"><?php echo $this->msg->get("Metodos_Numericos"); ?></div>
            <style type="text/css">
            ul.makeMenu, ul.makeMenu ul {
                padding-left: 1em;           /* stops the usual indent from ul */
                cursor: default;             /* gives an arrow cursor */
                margin: 0px;            /* Opera 7 final's margin and margin-box model cause problems */
            }
            ul.makeMenu li {
                list-style-type: none;       /* removes the bullet points */
                margin: 0px;                 /* Opera 7 puts large spacings between li elements */
                position: relative;          /* makes the menu blocks be positioned relative to their parent menu item
                                                the lack of offset makes these appear normal, but it will make a difference
                                                to the absolutely positioned child blocks */
                                 /* sets the default font colour to white */
            }
            ul.makeMenu li > ul {          /* using the > selector prevents many lesser browsers (and IE - see below) hiding child ULs */
                display: none;               /* hides child menu blocks - one of the most important declarations */
            }
            .teste
            {
                background-image: url('./imagens/bullet_closed.gif');
                background-repeat: no-repeat;
                padding-left: 1.2em;
                font-size: 1em;
                color: #000;
                cursor: pointer;
                /*background-color: #ddf;*/
            }

            /* and some link styles */
            </style>
            <!--[if gt IE 5.0]><![if lt IE 7]>
            <style type="text/css">
            /* that IE 5+ conditional comment makes this only visible in IE 5+ */
            ul.makeMenu li {  /* the behaviour to mimic the li:hover rules in IE 5+ */
            behavior: url( IEmen.htc );
            }
            ul.makeMenu ul {  /* copy of above declaration without the > selector, except left position is wrong */
            display: none; position: absolute; top: 2px; left: 78px;
            }
            </style>
            <![endif]><![endif]-->
            </style>
            <script>
            function showhide(id1, id2){
                if (document.getElementById){
                    obj1 = document.getElementById(id1);
                    obj2 = document.getElementById(id2);
                    if (obj1.style.display == "block"){
                        obj1.style.display = "none";
                        obj2.style.backgroundImage="url('./imagens/bullet_closed.gif')";
                    } else {
                        obj1.style.display = "block";
                        obj2.style.backgroundImage="url('./imagens/bullet_open.gif')";
                    }
                }
            }
            </script>
            <script type="text/javascript" src="menu.php"></script>
<?php
    /*if ($_SESSION['ANAWEB']->RetornaModo() == "aluno")
    {
?>
            <div>
                <ul class="makeMenu">
                    <li><span class="teste" id="titulo_pf" onclick="showhide('pf','titulo_pf')"><?php echo $this->msg->get("Menu_Aritmetica_PF"); ?></span>
                        <ul id="pf">
                            <li><a href="index.php?opcao=sistemaPF"><?php echo $this->msg->get("Menu_Sistema_PF"); ?></a></li>
                            <li><a href="index.php?opcao=somaPF"><?php echo $this->msg->get("Menu_Soma"); ?></a></li>
                            <li><a href="index.php?opcao=subtracaoPF"><?php echo $this->msg->get("Menu_Subtracao"); ?></a></li>
                            <li><a href="index.php?opcao=multiplicacaoPF"><?php echo $this->msg->get("Menu_Multiplicacao"); ?></a></li>
                            <li><a href="index.php?opcao=divisaoPF"><?php echo $this->msg->get("Menu_Divisao"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id ="titulo_matriz" onclick="showhide('matriz','titulo_matriz')"><?php echo $this->msg->get("Menu_Aritmetica_Matricial"); ?></span>
                        <ul id="matriz">
                            <li><a href="index.php?opcao=soma"><?php echo $this->msg->get("Menu_Soma"); ?></a></li>
                            <li><a href="index.php?opcao=multiplicacao"><?php echo $this->msg->get("Menu_Multiplicacao"); ?></a>
                            <li><a href="index.php?opcao=transposta"><?php echo $this->msg->get("Menu_Transposta"); ?></a></li>
                            <li><a href="index.php?opcao=determinante"><?php echo $this->msg->get("Menu_Determinante"); ?></a></li>
                            <li><a href="index.php?opcao=inversa"><?php echo $this->msg->get("Menu_Inversa"); ?></a></li>
                            <li><a href="index.php?opcao=decmat"><?php echo $this->msg->get("Menu_Decomposicao"); ?></a></li>
                            <li><a href="index.php?opcao=matdefpos"><?php echo $this->msg->get("Menu_Matrizes_Definidas_Positivas"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_seal" onclick="showhide('seal','titulo_seal')"><?php echo $this->msg->get("Menu_SEAL"); ?></span>
                        <ul id="seal">
                            <li><span class="teste" id="titulo_metodosdiretos" onclick="showhide('metodosdiretos','titulo_metodosdiretos')"><?php echo $this->msg->get("Menu_Metodos_Diretos"); ?></span>
                                <ul id="metodosdiretos">
                                    <li><span class="teste" id="titulo_gauss" onclick="showhide('gauss','titulo_gauss')"><?php echo $this->msg->get("Menu_Eliminacao_Gauss"); ?></span>
                                        <ul id="gauss">
                                            <li><a href="index.php?opcao=gauss1"><?php echo $this->msg->get("Menu_Sem_Pivoteamento"); ?></a></li>
                                            <li><a href="index.php?opcao=gauss2"><?php echo $this->msg->get("Menu_Pivoteamento_Parcial"); ?></a></li>
                                        </ul>
                                    </li>
                                    <li><a href="index.php?opcao=ludecomp"><?php echo $this->msg->get("Menu_Decomposicao_LU"); ?></a></li>
                                    <li><a href="index.php?opcao=cholesky"><?php echo $this->msg->get("Menu_Cholesky"); ?></a></li>
                                </ul>
                            </li>
                            <li><span class="teste" id="titulo_metodositerativos" onclick="showhide('metodositerativos','titulo_metodositerativos')"><?php echo $this->msg->get("Menu_Metodos_Iterativos"); ?></span>
                                <ul id="metodositerativos">
                                    <li><a href="index.php?opcao=jacobi"><?php echo $this->msg->get("Menu_Jacobi"); ?></a></li>
                                    <li><a href="index.php?opcao=gauss-seidel"><?php echo $this->msg->get("Menu_Gauss_Seidel"); ?></a></li>
                                </ul>
                            </li>
                        </ul>
                    <li><span class="teste" id="titulo_interpolacao" onclick="showhide('interpolacao','titulo_interpolacao')"><?php echo $this->msg->get("Menu_Interpolacao"); ?></span>
                        <ul id="interpolacao">
                            <li><a href="index.php?opcao=lagrange"><?php echo $this->msg->get("Menu_Lagrange"); ?></a></li>
                            <li><a href="index.php?opcao=newton"><?php echo $this->msg->get("Menu_Newton"); ?></a></li>
                            <li><a href="index.php?opcao=spline"><?php echo $this->msg->get("Menu_Splines"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_ajdados" onclick="showhide('ajdados','titulo_ajdados')"><?php echo $this->msg->get("Menu_Ajuste_Dados"); ?></span>
                        <ul id="ajdados">
                            <li><a href="index.php?opcao=ajdados1"><?php echo $this->msg->get("Menu_Minimos_Quadrados"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_reseqnl" onclick="showhide('reseqnl','titulo_reseqnl')"><?php echo $this->msg->get("Menu_EQNL"); ?></span>
                        <ul id="reseqnl">
                            <li><a href="index.php?opcao=eqnl2"><?php echo $this->msg->get("Menu_Bisseccao"); ?></a></li>
                            <li><a href="index.php?opcao=eqnl1"><?php echo $this->msg->get("Menu_Secante"); ?></a></li>
                            <li><a href="index.php?opcao=eqnl3"><?php echo $this->msg->get("Menu_Newton_EQNL"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_seqnl" onclick="showhide('seqnl','titulo_seqnl')"><?php echo $this->msg->get("Menu_SEANL"); ?></span>
                        <ul id="seqnl">
                            <li><a href="index.php?opcao=seqnl"><?php echo $this->msg->get("Menu_Newton_SEANL"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_intder" onclick="showhide('intder','titulo_intder')"><?php echo $this->msg->get("Menu_Integrais_Derivadas"); ?></span>
                        <ul id="intder">
                            <li><span class="teste" id="titulo_derivada" onclick="showhide('derivada','titulo_derivada')"><?php echo $this->msg->get("Menu_Derivacao"); ?></span>
                                <ul id="derivada">
                                    <li><a href="index.php?opcao=derivada"><?php echo $this->msg->get("Menu_Diferenca"); ?></a></li>
                                </ul>
                            </li>
                            <li><span class="teste" id="titulo_integral" onclick="showhide('integral','titulo_integral')"><?php echo $this->msg->get("Menu_Integracao_Numerica"); ?></span>
                                <ul id="integral">
                                    <li><a href="index.php?opcao=intnum4"><?php echo $this->msg->get("Menu_Trapezio"); ?></a></li>
                                    <li><a href="index.php?opcao=intnum3"><?php echo $this->msg->get("Menu_Simpson"); ?></a></li>
                                    <li><a href="index.php?opcao=intnum1"><?php echo $this->msg->get("Menu_Richardson"); ?></a></li>
                                    <li><a href="index.php?opcao=intnum2"><?php echo $this->msg->get("Menu_Romberg"); ?></a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_seqnl" onclick="showhide('seqnl','titulo_seqnl')">Equacoes Diferencias Ordinarias</span>
                        <ul id="seqnl">
                            <li><a href="index.php?opcao=seqnl"></a></li>
                        </ul>
                    </li>
                </ul>
            </div>
<?php
    }
    else
    {
?>
            <div>
                <ul class="makeMenu">
                    <li><span class="teste" id="titulo_pf" onclick="showhide('pf','titulo_pf')"><?php echo $this->msg->get("Menu_Aritmetica_PF"); ?></span>
                        <ul id="pf">
                            <li><a href="index.php?opcao=gera_prob_ptoflut_sistema_xml"><?php echo $this->msg->get("Menu_Sistema_PF"); ?></a></li>
                            <li><a href="index.php?opcao=gera_prob_ptoflut_soma_xml"><?php echo $this->msg->get("Menu_Soma"); ?></a></li>
                            <li><a href="index.php?opcao=gera_prob_ptoflut_subtracao_xml"><?php echo $this->msg->get("Menu_Subtracao"); ?></a></li>
                            <li><a href="index.php?opcao=gera_prob_ptoflut_multiplicacao_xml"><?php echo $this->msg->get("Menu_Multiplicacao"); ?></a></li>
                            <li><a href="index.php?opcao=gera_prob_ptoflut_divisao_xml"><?php echo $this->msg->get("Menu_Divisao"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id ="titulo_matriz" onclick="showhide('matriz','titulo_matriz')"><?php echo $this->msg->get("Menu_Aritmetica_Matricial"); ?></span>
                        <ul id="matriz">
                            <li><a href="index.php?opcao=gera_prob_matriz_soma_xml"><?php echo $this->msg->get("Menu_Soma"); ?></a></li>
                            <li><a href="index.php?opcao=gera_prob_matriz_mul_xml"><?php echo $this->msg->get("Menu_Multiplicacao"); ?></a>
                            <li><a href="index.php?opcao=gera_prob_matriz_transposta_xml"><?php echo $this->msg->get("Menu_Transposta"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_seal" onclick="showhide('seal','titulo_seal')"><?php echo $this->msg->get("Menu_SEAL"); ?></span>
                        <ul id="seal">
                            <li><a href="index.php?opcao=seal_direto"><?php echo $this->msg->get("Menu_Metodos_Diretos"); ?></a></li>
                            <li><a href="index.php?opcao=seal_iterativo"><?php echo $this->msg->get("Menu_Metodos_Iterativos"); ?></a></li>
                        </ul>
                    <li><span class="teste" id="titulo_interpolacao" onclick="showhide('interpolacao','titulo_interpolacao')"><?php echo $this->msg->get("Menu_Interpolacao"); ?></span>
                        <ul id="interpolacao">
                            <li><a href="index.php?opcao=gera_interpolacao"><?php echo $this->msg->get("Menu_Interpolacao"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_ajdados" onclick="showhide('ajdados','titulo_ajdados')"><?php echo $this->msg->get("Menu_Ajuste_Dados"); ?></span>
                        <ul id="ajdados">
                            <li><a href="index.php?opcao=gera_prob_ajdados1_xml"><?php echo $this->msg->get("Menu_Minimos_Quadrados"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_reseqnl" onclick="showhide('reseqnl','titulo_reseqnl')"><?php echo $this->msg->get("Menu_EQNL"); ?></span>
                        <ul id="reseqnl">
                            <li><a href="index.php?opcao=gera_prob_eqnl3_xml"><?php echo $this->msg->get("Menu_EQNL2"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_seqnl" onclick="showhide('seqnl','titulo_seqnl')"><?php echo $this->msg->get("Menu_SEANL"); ?></span>
                        <ul id="seqnl">
                            <li><a href="index.php?opcao=gera_prob_seqnl_xml"><?php echo $this->msg->get("Menu_Newton_SEANL"); ?></a></li>
                        </ul>
                    </li>
                    <li><span class="teste" id="titulo_intder" onclick="showhide('intder','titulo_intder')"><?php echo $this->msg->get("Menu_Integrais_Derivadas"); ?></span>
                        <ul id="intder">
                            <li><span class="teste" id="titulo_derivada" onclick="showhide('derivada','titulo_derivada')"><?php echo $this->msg->get("Menu_Derivacao"); ?></span>
                                <ul id="derivada">
                                    <li><a href="index.php?opcao=gera_prob_derivada_xml"><?php echo $this->msg->get("Menu_Diferenca"); ?></a></li>
                                </ul>
                            </li>
                            <li><span class="teste" id="titulo_integral" onclick="showhide('integral','titulo_integral')"><?php echo $this->msg->get("Menu_Integracao_Numerica"); ?></span>
                                <ul id="integral">
                                    <li><a href="index.php?opcao=gera_prob_intnum4_xml"><?php echo $this->msg->get("Menu_Trapezio"); ?></a></li>
                                    <li><a href="index.php?opcao=gera_prob_intnum3_xml"><?php echo $this->msg->get("Menu_Simpson"); ?></a></li>
                                    <li><a href="index.php?opcao=gera_prob_intnum1_xml"><?php echo $this->msg->get("Menu_Richardson"); ?></a></li>
                                    <li><a href="index.php?opcao=gera_prob_intnum2_xml"><?php echo $this->msg->get("Menu_Romberg"); ?></a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
<?php
    }*/
?>
<?php
    if (isset($_GET['inc'])) $opt = $_GET['inc'];
    elseif (isset($_GET['opcao'])) $opt = $_GET['opcao'].".php";
    if (!empty($opt))
    {
?>
<?php
    }
?>
<?php
            }
        }
?>
        </div>
        <div id="conteudo">
<?php
    }

    public function Footer()
    {
?>
        </div>
        <div id="footer">
            <?php echo $this->msg->get('Footer') ?>
        </div>
    </div>
    </body>
</html>
<?php

    }
}
